import request from '/@/utils/request'
import {prefix} from '/@/api/oa'

/**
 * 添加职务
 */
export function create(data: object) {
    return request({
        url: prefix + '/officePost/create',
        method: 'post',
        data
    })
}

/**
 * 编辑职务
 */
export function edit(data: object) {
    return request({
        url: prefix + '/officePost/edit',
        method: 'post',
        data
    })
}

/**
 * 职务分页数据
 */
export function getPage(params: object) {
    return request({
        url: prefix + '/officePost/getPage',
        method: 'get',
        params
    })
}

/**
 * 删除职务
 */
export function removeData(data: object) {
    return request({
        url: prefix + '/officePost/delete',
        method: 'post',
        data
    })
}

/**
 * 职务选择器数据
 */
export function getSelectorList() {
    return request({
        url: prefix + '/officePost/getSelectorList',
        method: 'get'
    })
}
